<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model as BaseModel;


class AddressModel extends BaseModel
{
    protected $table = 't_address';

    protected $primaryKey = 'id';

    public $timestamps = true;

//    const CREATED_AT = 'created_at';
    
    const UPDATED_AT = null;

    protected $guarded = [];

//    protected $hidden = [
//        'deleted_at',
//    ];


    //获取地址名称
    public static function get_address_name($id){
        return self::where('id', $id)->value('shortname');
    }

}
